<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller{
    public function index(){
    	header('Content-type:text/html;charset=utf-8');
        $_SESSION['href']='Index/index';//记录当前的URL，实现登录后跳转到登录前界面
        $username=$_SESSION['username'];
        $this->assign('username',$username);
        $this->assign('uid', $_SESSION['uid']);
        $this -> display();
    }
    public function logout(){
    	session("userid",null);
        header("Location:".U("Index/index"));
    }
      function _empty(){
        header("HTTP/1.0 404 Not Found");//使HTTP返回404状态码
        $this->display("Error:error404");
    }
}
